package com.qf.dao;

import com.qf.entity.Type;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import java.util.List;


/**
 * @description: cool新闻
 * @author: No1
 * @create: 2020-11-30 11:33:07
 */
public interface TypeDao {
    /*新增*/
    @Insert("insert into t_type (id,name) values(#{id},#{name})")
    int insert(Type type);

    /*删除*/
    @Delete("delete from t_type where id=#{id}")
    int deleteById(int id);
    /*查询全部*/
    @Select("select * from t_type")
    List<Type> all();
}